﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EFRecipes {
    class Program {
        static void Main(string[] args) {
            //using (var context = new EFRecipesEntities()) {
            //    context.People.AddObject(new Person() {
            //        FirstName = "Jeffrey",
            //        LastName = "Hsu",
            //        PhoneNumber = "13573828379"
            //    });

            //    context.SaveChanges();
            //}

            using (var context = new EFRecipesEntities()) {
                foreach (var person in context.People) {
                    Console.WriteLine("{0} {1} {2}, Phone: {3}",
                        person.FirstName,
                        person.MiddleName,
                        person.LastName,
                        person.PhoneNumber);
                }
            }
        }
    }
}
